home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / fmt200.zip / FMT.TXT < prev   
Text File  |  1993-02-07  |  8KB  |  265 lines

  1. ************************************************************************
  2.  
  3. FMT version 2.00 : Written by Clair Alan Hardesty : 07-FEB-1993
  4.  
  5.   Fast floppy disk formatter for AT compatible computers
  6.  
  7. Features:
  8.  
  9.   1: Format verification is an option, allowing fast formatting on
  10.       known good media by not specifying it.
  11.  
  12.   2: Generates DOS version 4.0 style volume serial numbers.
  13.  
  14.   3: The system files may be copied, producing a bootable floppy.
  15.  
  16.   4: The "insert disk" prompt may be bypassed, easing use in batch files
  17.       and speeding formatting of a single floppy already in the drive.
  18.       NOTE: Use with caution, as formatting begins immediately!
  19.  
  20.   5: Recursive formatting is optional.
  21.  
  22.   6: All program output is to STDOUT, allowing redirection.
  23.  
  24.   7: Extensively commented source code is included.
  25.  
  26.   8: The boot sector data is coded entirely in assembly language,
  27.       this is a feature that I have not seen in any other floppy
  28.       format program.  I hope this provides others with an increased
  29.       understanding of DOS and of the possibilities of assembly
  30.       language programming.
  31.  
  32.   9: A plethora of error messages and exit codes provide detailed
  33.       program fault information.
  34.  
  35.  10: Program progress display is informative without being verbose.
  36.  
  37.  11: Small code size: approximately 7 Kb.
  38.  
  39.  12: The floppy boot sector contains the drive parameter table,
  40.       this should help in making nonstandard formats bootable,
  41.       (something I may attempt in the next major revision).
  42.  
  43. ************************************************************************
  44.  
  45. The source code for FMT has been included for several major reasons:
  46.  
  47.   1: To provide the user with peace of mind, (you are encouraged to
  48.       examine the source and compile it yourself), as any program
  49.       that does low level disk I/O is a potential nemesis.
  50.  
  51.   2: To share what I have learned from writing it with others.
  52.  
  53.   3: To encourage others to do likewise.
  54.  
  55.   4: To show off (not too boisterously, but I am proud of my work).
  56.  
  57. Users are permitted to use any portion of the source code in any
  58.  program written for distribution, commercial or otherwise, including
  59.  distribution of the source code, providing credit is given where
  60.  credit is due.
  61.  
  62. You are encouraged to distribute the original files, provided they
  63.  are unaltered and distributed as a set.  The files are:
  64.  
  65.   1: FMT.ASM - the source code
  66.   2: FMT.COM - the compiled program
  67.   3: FMT.DOC - this file in Microsoft Word for Windows 2.0 format
  68.   4: FMT.TXT - this file in standard ASCII format
  69.  
  70. I may be contacted at:
  71.  
  72.   (916) 478-8201 Voice
  73.   (916) 478-8251 FAX
  74.  
  75.   On the Internet at: gclairh@gvpc37.ssi1.com
  76.  
  77.   or in writing:
  78.  
  79.   Clair Alan Hardesty
  80.   Design Validation Engineer II
  81.   Silicon Systems, Inc.
  82.   138 New Mohawk Road
  83.   Nevada City, CA 95959-3262
  84.  
  85. ************************************************************************
  86.  
  87. Syntax: FMT d: size [V] [S] [D] [N|R] [U]
  88.  
  89.   where: d = drive (A or B), size = floppy size in Kb,
  90.  
  91.     the optional V enables format verification, the optional S
  92.  
  93.     copies the system files, the optional D enables the enhanced
  94.  
  95.     DOS compatibility mode, the optional N bypasses the prompt,
  96.  
  97.     the optional R enables recursive formatting with prompting,
  98.  
  99.     the optional C enables the 720K 1 sector per cluster option,
  100.  
  101.     and the optional U creates a UNIX disk (F6h fills entire disk)
  102.  
  103.   supported sizes are:
  104.  
  105.     360 for a 360 Kb floppy in a 360 Kb or 1.2 Mb drive
  106.     720 for a 720 Kb floppy in a 720 Kb, 1.44 Mb, or 2.88 Mb drive
  107.     1200 for a 1.2 Mb floppy in a 1.2 Mb drive
  108.     1440 for a 1.44 Mb floppy in a 1.44 Mb  or 2.88 Mb drive
  109.     2880 for a 2.88 Mb floppy in a 2.88 Mb drive
  110.  
  111. notes:
  112.  
  113.   1:When the N option (bypass prompt) is used, formatting begins
  114.     immediately (be sure the proper floppy is in the drive). Only the
  115.     break key will abort the format (escape is disabled), this allows
  116.     the user to type ahead of the format command.
  117.  
  118. ************************************************************************
  119.  
  120. Exit codes:
  121.  
  122.   0 = successful format
  123.   1 = failure during format, verify, or write
  124.   2 = disk size / drive type combination is not supported
  125.   3 = requested drive does not exist
  126.   4 = invalid or null command line
  127.   5 = system files not found or error writing system files
  128.   6 = computer is not AT compatible
  129.   7 = insufficient memory for file copy buffer (system transfer)
  130.   8 = insufficient stack space for program
  131.   9 = program aborted by user (Control-C, Break, or Escape)
  132.  10 = unknown drive type (CMOS RAM says floppy type is greater than 5)
  133.  11 = memory allocation error (while attempting to reduce memory)
  134.  12 = both N and R options specified (only one allowed)
  135.  13 = 720K option secified, but not 720K format
  136.  
  137. ************************************************************************
  138.  
  139. In order to use the system transfer option, the following files
  140.  
  141.   must be in the root directory of the default drive:
  142.  
  143.     1: IBMBIO.COM or IO.SYS (normally a hidden file)
  144.  
  145.     2: IBMDOS.COM or MSDOS.SYS (normally a hidden file)
  146.  
  147.     3: COMMAND.COM
  148.  
  149. ************************************************************************
  150.  
  151. To compile with Borland Turbo Assembler version 1.0 or greater:
  152.  
  153.   tasm /t fmt
  154.  
  155.   tlink /t /x fmt
  156.  
  157.     or
  158.  
  159.   tasm /t /zi fmt
  160.  
  161.   tlink /v /x fmt
  162.  
  163.   tdstrip -c -s fmt
  164.  
  165.     for use with Turbo Debugger
  166.  
  167. ************************************************************************
  168.  
  169. To compile with Microsoft Macro Assembler version 5.0 or greater:
  170.  
  171.   masm /t fmt;
  172.  
  173.   link fmt;
  174.  
  175.   exe2bin fmt fmt.com
  176.  
  177.   del fmt.exe
  178.  
  179. ************************************************************************
  180.  
  181. Microsoft(R) is a registered trademark of Microsoft Corporation
  182.  
  183. IBM(R) and PS/2 are registered trademarks of International
  184.  
  185.   Business Machines Corporation
  186.  
  187. Turbo Assembler(R) and Turbo Debugger(R) are registered trademarks
  188.  
  189.   of Borland International
  190.  
  191. ************************************************************************
  192.  
  193. Revision history:
  194.  
  195.   Version 1.00 : 23-JAN-1990
  196.  
  197.     Initial public release
  198.  
  199.   Version 1.10 : 03-FEB-1990
  200.  
  201.     Fixed MASM bugs
  202.  
  203.     Added MASM version 5.0 compatibility
  204.  
  205.     Improved compatibility for drive type determination
  206.  
  207.     Added a break handler and "user abort" message
  208.  
  209.     Added some new exit codes
  210.  
  211.     Improved the boot record code
  212.  
  213.     Improved computer compatibility (some Wyse computers have problems)
  214.  
  215.   Version 1.20 : 10-JUL-1990
  216.  
  217.     Fixed serial number generation to match IBM format exactly
  218.  
  219.     Fixed system file transfer to work with IBM or Microsoft DOS
  220.  
  221.     Modified the user abort code to accept the ESCAPE, CONTROL-C, or
  222.  
  223.       BREAK keys, and fixed some bugs in the user abort code
  224.  
  225.     Added recursive formatting capability
  226.  
  227.   Version 1.30 : 22-DEC-1990
  228.  
  229.     Comment clarifications
  230.  
  231.     Minor code improvements
  232.  
  233.   Version 1.40 : 21-JUN-1991
  234.  
  235.     Improved compatibility for some machines (mainly PS/2s)
  236.  
  237.   Version 1.50 : 28-FEB-1992
  238.  
  239.     Upgraded to MS-DOS 5.0 with support for 2.88 Mb floppy drives
  240.  
  241.     Fixed a bug in the reset subroutine retry code
  242.  
  243.   Version 1.60 : 09-MAR-1992
  244.  
  245.     Fixed a bug in the format subroutine that caused some machines
  246.     (COMPAQs) to fail verification. Thanks to Ralph Riggs for
  247.     pointing out this bug and assisting in it's eradication.
  248.  
  249.   Version 1.70 : 01-NOV-1992
  250.  
  251.     Fixed a bug in the stack check code.
  252.     Added the UNIX format option.
  253.     Removed the copyright - released to the public domain
  254.  
  255.   Version 2.00 : 07-FEB-1993
  256.  
  257.     added 720 Kb floppy 1 sector per cluster option
  258.  
  259. ************************************************************************
  260.  
  261.   The current version (2.00) was compiled with Borland Turbo Assembler
  262.    version 3.1 and linked with Borland Turbo Linker version 5.22b
  263.  
  264. ************************************************************************
  265.